package com.zmj.sy.mom.srv.aps.controller;

import com.zmj.sy.mom.srv.aps.bean.vo.base.BaseIdReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.base.BaseResVo;
import com.zmj.sy.mom.srv.aps.bean.vo.order.OrderAddReqVo;
import com.zmj.sy.mom.srv.aps.service.QmsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequiredArgsConstructor
@Api(tags = "QMS")
@RestController
@RequestMapping("/qms")
public class QmsController {
    private final QmsService qmsService;
    @ApiOperation("订单物料信息推送 QMS")
    @PostMapping("/pushOrderMaterial2QMS")
    public BaseResVo pushMaterial2QMS(@RequestBody BaseIdReqVo reqVo) {
        qmsService.pushOrderMaterial2QMS(reqVo.getId());
        return BaseResVo.ok();
    }
}
